package com.zkw.group.service;

import com.zkw.group.entity.ProfesTerm;
import com.zkw.group.entity.ProfesTermCourse;
import com.zkw.group.mapper.PublicProfesTermMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PublicProfesTermService {

    @Autowired
    private PublicProfesTermMapper publicProfesTermMapper;

    //获取学期列表
    public List<ProfesTerm> getAllProfesTermList(String termname, int pageStart, int pageSize){
        return publicProfesTermMapper.getAllProfesTermList(termname, pageStart, pageSize);
    }

    //获取学期条目数
    public int getProfesTermCounts(String termname){
        return  publicProfesTermMapper.getProfesTermCounts(termname);
    }

    //获取学期内课程列表
    public List<ProfesTermCourse> getAllProfesTermCourseList(String cname, String termname, int pageStart, int pageSize){
        return publicProfesTermMapper.getAllProfesTermCourseList(cname,termname,pageStart,pageSize);
    }

    //获取学期内课程条目数
    public int getProfesTermCourseCounts(String cname,String termname){
        return publicProfesTermMapper.getProfesTermCourseCounts(cname,termname);
    }
}
